These functions allow you to determine a user’s identity or security rights to limit access to the application based on these criteria. You might use these functions to control the visibility of graphic objects.
This function |
Returns this value |
CurrentUserName( ) |
A string containing the name of the current user. This function is case sensitive. All RSView 3.20 and earlier user names use uppercase letters. |
CurrentUserHasCode(SecurityCode) |
1 (true) if any of the specified security codes have been assigned to the user; 0 (false) if not. The argument can be a security code, tag name, or tag placeholder. If you use a tag name or tag placeholder, it must be enclosed in curly brackets ({}), for example, CurrentUserHasCode({#1}). If checking multiple security codes, do not type a space between the security code letters. For example, CurrentUserHasCode(ABP) returns the value 1 if the user has been assigned one or more of the specified codes. |
CurrentUserHasGroup("Group Name") |
1 (true) if the current user is assigned to the specified group configured in FactoryTalk Diagnostics; 0 (false) if not. The argument can be a literal string, string tag, or tag placeholder. If you use a string, it must be enclosed in double quotes, for example, CurrentUserHasGroup ("UserGroupName1"). The argument can also be a combination of a literal string and string tag in the format of “Liter string” + String tag, for example, CurrentUserHasGroup ("UserGroupName1"+{[Controller]Main.UserGroupName}). If CurrentUserHasGroup("Group C") returns the value 1, the user has been assigned to Group C. This function is only supported in 8.0 and later versions of FactoryTalk ME applications. |
Tip: |
|